﻿using System;
using System.Collections.Generic;

class ConvertDecimalToHexadecimal
{
    static void Main()
    {
        int userInput = int.Parse(Console.ReadLine());
        List<string> hexRepresentation = new List<string>();

        for (int i = 0; i < int.MaxValue; i++)
        {
            if (userInput > 16)
            {
                hexRepresentation[i] = (userInput / 16).ToString();
                userInput -= int.Parse(hexRepresentation[i]) * 16;



            }


            if (userInput == 1)
            {
                break;
            }
        }
    }
}